(() => {
    //类 类型：类的类型可以通过接口来实现
    //定义一个类类型的接口
    interface IFly {
        fly()
    }
    class Fly implements IFly {
        fly() {
            console.log("我是类类型的接口");
        }
    }
    const person = new Fly()
    person.fly();

    //在定义一个接口
    interface ISwim {
        swim()
    }
    class FlyIswim implements IFly, ISwim {
        fly() {
            console.log("飞了");
        }
        swim() {
            console.log("游泳");
        }
    }
    const person2 = new FlyIswim()
    person2.fly()
    person2.swim()

    //定义一个接口，继承其它的接口
    interface FlyAndSwim extends IFly, ISwim { }
    class Person3 implements FlyAndSwim {
        fly() {
            console.log("飞了");
        }
        swim() {
            console.log("游泳");
        }
    }
    const person3 = new Person3()
    person3.fly()
    person3.swim()

    //总结：接口和接口之间叫继承（extends实现），类和接口之间叫实现（implements实现F）

})()